package Lexical;

public class Type extends Token
{
	public final TypeTag type;
	
	/**
	 * Constructor of a Token for a type.
	 * @param type a a TypeTag value for the Token.
	 */
	public Type (TypeTag type) 
	{ 
		super (Tag.TYPE); 
		this.type = type; 
	}
	
	/**
	 * Constructor of a Token for a type.
	 * @param type a a TypeTag value for the Token.
	 * @param line the line of the code where the token was found.
	 */
	public Type (TypeTag type, int line) 
	{ 
		super (Tag.TYPE, line); 
		this.type = type; 
	}
	
	public String toString()
	{
		return type.getName();
	}

}
